package edu.ar.bases.dvdstore.domainmodel.entities;

import edu.ar.bases.dvdstore.domainmodel.entities.interfaces.IDomicilio;
import edu.ar.bases.dvdstore.domainmodel.entities.interfaces.IPersona;




public class Domicilio implements IDomicilio {

	private String calle;
	private String cod_postal;
	private String depto;
	private int domicilioID;
	private int numero;
	private String piso;
	public IPersona persona;
	private Localidad localidad;

	public Domicilio(){

	}

	public void finalize() throws Throwable {

	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.IDomicilio#getCalle()
	 */
	public String getCalle() {
		return calle;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.IDomicilio#setCalle(java.lang.String)
	 */
	public void setCalle(String calle) {
		this.calle = calle;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.IDomicilio#getCod_postal()
	 */
	public String getCod_postal() {
		return cod_postal;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.IDomicilio#setCod_postal(java.lang.String)
	 */
	public void setCod_postal(String cod_postal) {
		this.cod_postal = cod_postal;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.IDomicilio#getDepto()
	 */
	public String getDepto() {
		return depto;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.IDomicilio#setDepto(java.lang.String)
	 */
	public void setDepto(String depto) {
		this.depto = depto;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.IDomicilio#getDomicilioID()
	 */
	public int getDomicilioID() {
		return domicilioID;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.IDomicilio#setDomicilioID(int)
	 */
	public void setDomicilioID(int domicilioID) {
		this.domicilioID = domicilioID;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.IDomicilio#getNumero()
	 */
	public int getNumero() {
		return numero;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.IDomicilio#setNumero(int)
	 */
	public void setNumero(int numero) {
		this.numero = numero;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.IDomicilio#getPiso()
	 */
	public String getPiso() {
		return piso;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.IDomicilio#setPiso(java.lang.String)
	 */
	public void setPiso(String piso) {
		this.piso = piso;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.IDomicilio#getPersona()
	 */
	public IPersona getPersona() {
		return persona;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.IDomicilio#setPersona(edu.ar.bases.dvdstore.domainmodel.entities.Persona)
	 */
	public void setPersona(IPersona persona) {
		this.persona = persona;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((calle == null) ? 0 : calle.hashCode());
		result = prime * result
				+ ((cod_postal == null) ? 0 : cod_postal.hashCode());
		result = prime * result + ((depto == null) ? 0 : depto.hashCode());
		result = prime * result + domicilioID;
		result = prime * result + numero;
		result = prime * result + ((persona == null) ? 0 : persona.hashCode());
		result = prime * result + ((piso == null) ? 0 : piso.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final Domicilio other = (Domicilio) obj;
		if (calle == null) {
			if (other.calle != null)
				return false;
		} else if (!calle.equals(other.calle))
			return false;
		if (cod_postal == null) {
			if (other.cod_postal != null)
				return false;
		} else if (!cod_postal.equals(other.cod_postal))
			return false;
		if (depto == null) {
			if (other.depto != null)
				return false;
		} else if (!depto.equals(other.depto))
			return false;
		if (domicilioID != other.domicilioID)
			return false;
		if (numero != other.numero)
			return false;
		if (persona == null) {
			if (other.persona != null)
				return false;
		} else if (!persona.equals(other.persona))
			return false;
		if (piso == null) {
			if (other.piso != null)
				return false;
		} else if (!piso.equals(other.piso))
			return false;
		return true;
	}

	public Localidad getLocalidad() {
		return localidad;
	}

	public void setLocalidad(Localidad localidad) {
		this.localidad = localidad;
	}

}